package main

import (
	"fmt"
	"reflect"
)

type User struct {
	Name  string `json:"name" db:"user_name"`
	Age   int    `json:"age" db:"user_age"`
	Email string `json:"email" db:"user_email"`
}

func main() {
	user := User{Name: "Alice", Age: 30, Email: "alice@example.com"}

	t := reflect.TypeOf(user)

	for i := 0; i < t.NumField(); i++ {
		field := t.Field(i)
		tag := field.Tag

		fmt.Printf("Field: %s, Tag: %s\n", field.Name, tag)
		fmt.Printf("json tag: %s, db tag: %s\n", tag.Get("json"), tag.Get("db"))
	}
}
